using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using BaseScripts;

/// <summary>
/// 由StartCondition挂载到被影响的GameObject上, 进行实际的效果作用(Effect，不同与Influence，可以理解为一种Influence会利用多种Effect进行效果作用)
/// 注意所有的影响请通过status的AddEffect进行作用
/// 
/// public enum EffectType{
///     None,
///     NormalDamage,  //在Effect构造函数value属性中填入:(value[0])伤害值
///     AddForce, //在Effect构造函数value属性中填入:(value[0], value[1], value[2])作为作用力的方向, value[3]为作用力的大小(若无则大小为1)
///     GetHit, //通知被击中, 调用Status.GetHit函数.
/// }   
///  
/// /// </summary>
[RequireComponent(typeof(Status))]
public class BaseInfluence : MonoBehaviour {
    protected Status status;
    protected virtual void Awake(){ status = GetComponent<Status>(); }
    protected virtual void Start(){}
    protected virtual void Update(){}
    protected virtual void End(){ GameObject.Destroy(this); }
    // Added method for ApplyInfluence
    protected virtual void ApplyInfluence(Status targetStatus) {}
}